Share skills hook note post-processing#2679
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR centralizes “hook command dot-to-hyphen conversion” guidance by moving hook-note injection into the shared skills integration base, then updates integrations and tests to rely on the shared behavior.
Changes:
- Add shared hook-note injection to the base skills post-processing pipeline.
- Update Claude/Vibe/Copilot integrations to use base post-processing and remove duplicated logic.
- Add/adjust integration tests to verify hook guidance appears only where expected and remains idempotent.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/integrations/test_integration_copilot.py | Adds coverage that Copilot skills include shared hook guidance and still inject mode frontmatter. |
| tests/integrations/test_integration_claude.py | Refactors tests to validate shared base behavior and removes Claude-specific injection calls. |
| tests/integrations/test_integration_base_skills.py | Adds base-level test ensuring hook sections include dotted-command conversion guidance. |
| src/specify_cli/integrations/vibe/init.py | Switches to base post-processing instead of bespoke post-generation rewriting. |
| src/specify_cli/integrations/copilot/init.py | Injects hook guidance for Copilot skills (but not via super() yet). |
| src/specify_cli/integrations/claude/init.py | Removes duplicated hook-note injector and delegates shared behavior to base post-processing. |
| src/specify_cli/integrations/base.py | Introduces shared hook-note injection and applies post-processing during skill generation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Apply skill content post-processing before the initial write, use an exact hook-note sentinel for idempotence, and route Copilot skill post-processing through the shared helper before adding mode frontmatter.
mnriem
left a comment
There was a problem hiding this comment.
Please address Copilot feedback. If not applicable, please explain why
|
Follow-up verification on current head
AI assistance disclosure: AI assistance was used for verification and drafting this status comment; I reviewed the code and command output before posting. |
|
Thank you! |
Summary
Fixes #2523
Tests
git diff --checkuvx ruff check src/uv run python -m pytest tests/integrations/test_integration_base_skills.py tests/integrations/test_integration_claude.py tests/integrations/test_integration_copilot.py tests/integrations/test_integration_vibe.py tests/integrations/test_integration_codex.py tests/integrations/test_integration_agy.py tests/integrations/test_integration_devin.py tests/integrations/test_integration_cursor_agent.py tests/integrations/test_integration_kimi.py tests/integrations/test_integration_lingma.py tests/integrations/test_integration_trae.py -quv run pytest -quv run specify --helpAI Disclosure